package com.iwayin.core.dao.loginwith;

import java.util.Map;

import com.iwayin.core.dao.BaseDAOImpl;

public class LoginWithDAOImpl extends BaseDAOImpl implements LoginWithDAO {

	@Override
	public Long getQQMember(String openId) {
		return (Long) this.getSqlMapClientTemplate().queryForObject("LoginWithDAO.getQQMember", openId);
	}

	@SuppressWarnings("rawtypes")
	@Override
	public void updateQQMember(Map qqMember) {
		this.getSqlMapClientTemplate().update("LoginWithDAO.updateQQMember", qqMember);
	}

	@SuppressWarnings("rawtypes")
	@Override
	public void addQQMember(Map qqMember) {
		this.getSqlMapClientTemplate().insert("LoginWithDAO.addQQMember", qqMember);
	}

	@Override
	public Long getSinaMember(String uid) {
		return (Long) this.getSqlMapClientTemplate().queryForObject("LoginWithDAO.getSinaMember", uid);
	}

	@SuppressWarnings("rawtypes")
	@Override
	public void updateSinaMember(Map sinaMember) {
		this.getSqlMapClientTemplate().update("LoginWithDAO.updateSinaMember", sinaMember);
	}

	@SuppressWarnings("rawtypes")
	@Override
	public void addSinaMember(Map sinaMember) {
		this.getSqlMapClientTemplate().insert("LoginWithDAO.addSinaMember", sinaMember);
	}

	@Override
	public Long getTbMember(String uid) {
		return (Long) this.getSqlMapClientTemplate().queryForObject("LoginWithDAO.getTbMember", uid);
	}

	@SuppressWarnings("rawtypes")
	@Override
	public void updateTbMember(Map tbMember) {
		this.getSqlMapClientTemplate().update("LoginWithDAO.updateTbMember", tbMember);
	}

	@SuppressWarnings("rawtypes")
	@Override
	public void addTbMember(Map tbMember) {
		this.getSqlMapClientTemplate().insert("LoginWithDAO.addTbMember", tbMember);
	}

	@Override
	public void addRenrenMember(Map rrMember) {
		executeInsert("LoginWithDAO.addRenrenMember", rrMember);
	}

	@Override
	public Long getRenrenMember(String rid) {
		return (Long) queryForObject("LoginWithDAO.getRenrenMember", rid);
	}

	@Override
	public void updateRenrenMember(Map rrMember) {
		executeUpdate("LoginWithDAO.updateRenrenMember", rrMember);
	}

}
